10. IMPORTANT! Working w/Exoplanet Explorer

IMPORTANT! Working w/Exoplanet Explorer

What is this?

You'll be working with a stripped down version of the Exoplanet Explorer to complete all of the programming quizzes for the rest of the course. So, you need to install it.

Installation

I built the Exoplanet Explorer from the Polymer Starter Kit. I'm copying most of the rest of these instructions from the README written by the Polymer team. If you ever need help, check out the README.

Clone the repo first (for everyone)

Here's the link to the repo.

You should be on the xhr-start branch. If not, then git checkout xhr-start or git checkout origin xhr-start.

Quick-start (for experienced users)

With Node.js installed, run the following one liner from the root of your Exoplanet Explorer download:

npm install -g gulp bower && npm install && bower install

Prerequisites (for everyone)

The full starter kit requires the following major dependencies:

  • Node.js, used to run JavaScript tools from the command line.
  • npm, the node package manager, installed with Node.js and used to install Node.js packages.
  • gulp, a Node.js-based build tool.
  • bower, a Node.js-based package manager used to install front-end packages (like Polymer).

To install dependencies:

1) Check your Node.js version.

node --version

The version should be at or above 0.12.x.

2) If you don't have Node.js installed, or you have a lower version, go to nodejs.org and click on the big green Install button.

3) Install gulp and bower globally.

npm install -g gulp bower

This lets you run gulp and bower from the command line.

4) Install the starter kit's local npm and bower dependencies.

cd exoplanet-explorer && npm install && bower install

This installs the element sets (Paper, Iron, Platinum) and tools the starter kit requires to build and serve apps.

NOTE! INSTALLATION MAY TAKE A LONG TIME! There are many dependencies to download and install.

Post-Installation and Workflow

For every quiz, you'll be given a branch to checkout. You can always find it in the instructor notes. All of your work will be done in:

app/scripts/app.js

Serve / watch

gulp serve

This outputs an IP address you can use to locally test and another that can be used on devices connected to your network.

It's recommended to use Chrome, as non-vulcanized Polymer projects will load fastest on Chrome.

Build & Vulcanize

gulp

Build and optimize the current project, ready for deployment. This includes linting as well as vulcanization, image, script, stylesheet and HTML optimization and minification.

Troubleshooting

See this bug if you get the following error from Gyp:

"Error: self signed certificate in certificate chain"

Still Having Difficulty with Installation?

Check out this post in the exoplanet-explorer repo!